#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QDebug>
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow) {
    ui -> setupUi(this);

    QString url = "C:/Users/10793/Desktop/test11.xlsx";
    QList<QVariant> vl;
    QList<QList<QVariant>> vll;

    for(int i = 0; i < 5; i ++) {
        vl.clear();
        for(int j = 0; j < 5; j ++) {
            vl.append(i + j);
        }
        vll.append(vl);
    }

    excel_handle = new ExcelHandle;
    excel_handle -> init(true, false, "我是混子我怕谁");
    excel_handle -> openBook(url);
    excel_handle -> openSheet(1);
    excel_handle -> writeData(1,2,QVariant(12));
    excel_handle -> writeDataSet("C2", vll);
    excel_handle -> save(url);
}

MainWindow::~MainWindow() {
    delete excel_handle;
    delete ui;
}
